Function Reference

_DateDaysInMonth

Returns the number of days in a month, based on the specified month and year.

#include <Date.au3>
_DateDaysInMonth ( $iYear, $iMonthNum )

 

Parameters

$iYear 4-digit year.
$iMonthNum Month number (1 = January, 12 = December).

 

Return Value

Success: Returns the number of days in the month.
Failure: Returns 0.
@Error: 0 = No error.
1 = Invalid month number or year.

 

Remarks

None.

 

Related

None.

 

Example


#include <Date.au3>

$iDays = _DateDaysInMonth( @YEAR,@MON )
MsgBox( 4096, "Days in Month", "This month has " & String( $iDays ) & " days in it." )